package com.molichuxing.gateway.bff.orders.entity.response;

import java.math.BigDecimal;
import java.util.List;

import com.molichuxing.framework.dto.ResponseRootDto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 订单费用明细vo
 * 
 * @author zoumingyu
 * @date 2019年9月21日
 *
 */
@Data
public class CostDetailsVo extends ResponseRootDto {
	private static final long serialVersionUID = 1237755639438893222L;

	@ApiModelProperty(value = "费用名")
	private String name;

	@ApiModelProperty(value = "费用说明")
	private String explain;

	@ApiModelProperty(value = "费用值")
	private BigDecimal amount;

	@ApiModelProperty(value = "费用值str")
	private String amountStr;
	
	@ApiModelProperty(value = "是否高亮（0：否，1：是）")
	private Boolean isHighlight = false;
	
	@ApiModelProperty(value = "子费用明细")
	private List<CostDetailsVo> costs;
	
	public CostDetailsVo() {
	}

	public CostDetailsVo(String name, String explain, BigDecimal amount, List<CostDetailsVo> costs) {
		this.name = name;
		this.explain = explain;
		this.amount = amount;
		this.amountStr = amount == null ? null : amount.stripTrailingZeros().toPlainString() + "元";
		this.costs = costs;
	}

	public CostDetailsVo(String name, String explain, BigDecimal amount) {
		this.name = name;
		this.explain = explain;
		this.amount = amount;
		this.amountStr = amount == null ? null : amount.stripTrailingZeros().toPlainString() + "元";
	}
	
	public CostDetailsVo(String name, String explain, BigDecimal amount, boolean isHighlight) {
		this.name = name;
		this.explain = explain;
		this.amount = amount;
		this.amountStr = amount == null ? null : amount.stripTrailingZeros().toPlainString() + "元";
		this.isHighlight = isHighlight;
	}

	public CostDetailsVo(String name, BigDecimal amount) {
		this.name = name;
		this.amount = amount;
		this.amountStr = amount == null ? null : amount.stripTrailingZeros().toPlainString() + "元";
	}
}
